package com.zatech.cgnci.project.base.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;
import java.util.Objects;

@Getter
@AllArgsConstructor
public enum StatisticalTypeEnum {

    CLAIM_INVENTORY("01", "赔案清单"),
    BUSINESS_OPERATIONS("02", "业务经营报表"),
    OUTSTANDING_CLAIMS("03", "未决赔款准备金年度汇总"),
    SUPERVISION("04", "业务监管报表"),
    ;
    public static StatisticalTypeEnum getEnumByCode(String code) {
        return Arrays.stream(values()).filter(e -> Objects.equals(e.getCode(), code)).findAny().orElse(null);
    }

    private String code;
    private String name;
}
